package com.xwj.dto;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @author xwj
 * @date 2020/4/29
 */
public class UserAccountDto {
    @NotNull
    private Long userId;
    @NotEmpty
    private String amount;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public BigDecimal getAmount() {
        return new BigDecimal(this.amount).multiply(new BigDecimal("100"));
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }
}
